fix(filesystem): declare openWorldHint on all tools#4480
Merged
olaservo merged 2 commits intoJul 6, 2026
Merged
Conversation
Every filesystem tool operates only on the local filesystem within its allowed directories — none reaches an open or external world — but none declared the MCP `openWorldHint` annotation, leaving open-world-hint coverage at 0/14. Set `openWorldHint: false` on all 14 tools and document it in the README's tool annotations section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@olaservo @domdomegg — could I get a review on this when you have a chance? 🙏 |
Member
|
Hi, just ran the npm release process for this change and its now live in https://www.npmjs.com/package/@modelcontextprotocol/server-filesystem/v/2026.7.10 |
Contributor
Author
|
@olaservo thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every tool in the filesystem server operates only on the local filesystem within its allowed directories — none reaches an open or external world — but none declared the MCP
openWorldHintannotation, so open-world-hint coverage was 0/14. This setsopenWorldHint: falseon all 14 tools (alongside their existingreadOnlyHint/idempotentHint/destructiveHint) and documents it in the README.Why
MCP
ToolAnnotationsincludeopenWorldHintto tell clients whether a tool interacts with an open/external world (e.g. web search, sending mail). A local filesystem server does not, so the correct value is an explicitfalse. Per the spec, an omittedopenWorldHintdefaults totrue— clients are told to assume an open world — so these tools were implicitly declared open-world. Setting the hint explicitly tofalsecorrects that implied default, makes the server's sandboxed, closed-world nature legible to clients, and satisfies annotation-coverage checks that flag the absent hint.Changes
src/filesystem/index.ts: addopenWorldHint: falseto all 14 tools'annotations.src/filesystem/README.md: documentopenWorldHint: falsein the "Tool annotations (MCP hints)" section.No behavior change.
npm run build+npm testpass; a livetools/listnow reportsopenWorldHinton 14/14 tools.Related
read_media_file'soutputSchemain this same file; the two branches auto-merge cleanly in either order (verified locally), so whichever lands second should only need a routine update.🤖 Generated with Claude Code